package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"rental/api/internal/config"
	"rental/rentalrpc/rentalrpcclient"
)

type ServiceContext struct {
	Config    config.Config
	RentalRpc rentalrpcclient.Rentalrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		RentalRpc: rentalrpcclient.NewRentalrpc(zrpc.MustNewClient(c.RentalRpc)),
	}
}
